<!DOCTYPE html>
<html lang="en">
<head>
    
    <meta charset="utf-8">
    <title>packages/my-dv-geo-gl/GeoGl.vue - Documentation</title>
    
    
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
    <script src="scripts/nav.js" defer></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav >
    
    <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-$ui_dv_my-dv-bar.html">$ui/dv/my-dv-bar</a></li><li><a href="module-$ui_dv_my-dv-box.html">$ui/dv/my-dv-box</a></li><li><a href="module-$ui_dv_my-dv-fill.html">$ui/dv/my-dv-fill</a></li><li><a href="module-$ui_dv_my-dv-geo.html">$ui/dv/my-dv-geo</a></li><li><a href="module-$ui_dv_my-dv-geo-gl.html">$ui/dv/my-dv-geo-gl</a></li><li><a href="module-$ui_dv_my-dv-icon.html">$ui/dv/my-dv-icon</a></li><li><a href="module-$ui_dv_my-dv-indicator.html">$ui/dv/my-dv-indicator</a></li><li><a href="module-$ui_dv_my-dv-line.html">$ui/dv/my-dv-line</a></li><li><a href="module-$ui_dv_my-dv-list.html">$ui/dv/my-dv-list</a></li><li><a href="module-$ui_dv_my-dv-loading.html">$ui/dv/my-dv-loading</a></li><li><a href="module-$ui_dv_my-dv-menu.html">$ui/dv/my-dv-menu</a></li><li><a href="module-$ui_dv_my-dv-page.html">$ui/dv/my-dv-page</a></li><li><a href="module-$ui_dv_my-dv-pictorial.html">$ui/dv/my-dv-pictorial</a></li><li><a href="module-$ui_dv_my-dv-pie.html">$ui/dv/my-dv-pie</a></li><li><a href="module-$ui_dv_my-dv-progress.html">$ui/dv/my-dv-progress</a></li><li><a href="module-$ui_dv_my-dv-radar.html">$ui/dv/my-dv-radar</a></li><li><a href="module-$ui_dv_my-dv-rank.html">$ui/dv/my-dv-rank</a></li><li><a href="module-$ui_dv_my-dv-ring.html">$ui/dv/my-dv-ring</a></li><li></li><li><a href="module-$ui_dv_my-dv-screen.html">$ui/dv/my-dv-screen</a></li><li><a href="module-$ui_dv_my-dv-starry.html">$ui/dv/my-dv-starry</a></li><li><a href="module-$ui_dv_my-dv-text.html">$ui/dv/my-dv-text</a></li><li><a href="module-$ui_dv_my-dv-title.html">$ui/dv/my-dv-title</a></li></ul><h3>Events</h3><ul><li><a href="module-$ui_dv_my-dv-menu.html#~event:click">click</a></li></ul><h3>Global</h3><ul><li><a href="global.html#darken">darken</a></li><li><a href="global.html#fade">fade</a></li><li><a href="global.html#getCircleRadianPoint">getCircleRadianPoint</a></li><li><a href="global.html#getColorByKeyword">getColorByKeyword</a></li><li><a href="global.html#getColorFromRgbValue">getColorFromRgbValue</a></li><li><a href="global.html#getOpacity">getOpacity</a></li><li><a href="global.html#getRgbaValue">getRgbaValue</a></li><li><a href="global.html#getRgbValue">getRgbValue</a></li><li><a href="global.html#getRgbValueFromHex">getRgbValueFromHex</a></li><li><a href="global.html#getRgbValueFromRgb">getRgbValueFromRgb</a></li><li><a href="global.html#lighten">lighten</a></li><li><a href="global.html#props">props</a></li><li><a href="global.html#toHex">toHex</a></li><li><a href="global.html#toRgb">toRgb</a></li><li><a href="global.html#validator">validator</a></li></ul>
</nav>

<div id="main">
    
    <h1 class="page-title">packages/my-dv-geo-gl/GeoGl.vue</h1>
    

    



    
    <section>
        <article>
            <pre class="prettyprint source linenums"><code>&lt;template>
  &lt;Box class="my-dv-chart my-dv-geo-gl"
       default-width="800px"
       default-height="600px"
       v-bind="$attrs">
    &lt;Loading v-if="loading" :zoom="0.6">&lt;/Loading>
    &lt;MyChartMapGl v-else
                  ref="chart"
                  width="100%"
                  height="100%"
                  v-on="$listeners"
                  :map="mapGeoName"
                  :data="chartData"
                  :register="json"
                  :extend="options"
                  :settings="mapSettings"
                  :debug="debug"
                  v-bind="$attrs">&lt;/MyChartMapGl>
    &lt;slot>&lt;/slot>
  &lt;/Box>
&lt;/template>

&lt;script>
  /**
   * 3D地图
   * @module $ui/dv/my-dv-geo-gl
   */
  import {MyChartMapGl} from '$ui/charts'
  import Chart from '../../mixins/Chart'
  import Loading from '../my-dv-loading'
  import merge from 'lodash/merge'
  import {mapStyle, viewControl, visualMap} from './defaults'

  export default {
    name: 'MyDvGeoGl',
    inheritAttrs: false,
    mixins: [Chart],
    components: {
      Loading,
      MyChartMapGl
    },
    /**
     * 属性参数
     * @member props
     * @property {string} [name] 注册的地图名称
     * @property {Object|Function} [json] 地图geoJson
     * @property {Object|Function} [extend] extend 扩展
     * @property {Object} [control] 控制配置
     * @property {Object} [visual]
     * @property {string} [type=map3D] 图表类型
     * @property {Array} [columns] 数据列
     * @property {Array} [rows] 数据行
     * @property {Function} [loader] 数据加载函数，如设置了loader，type、columns、rows 将失效
     * @property {object|function} [dataHelper] 构造序列数据项辅助函数
     * @property {object|function} [typeHelper] 序列构造辅助函数
     * @property {object} [mapStyle] 地图基础样式
     */
    props: {
      name: String,
      // geoJSON
      json: [Object, Function],
      // extend 扩展
      extend: [Object, Function],
      // 控制配置
      control: Object,
      visual: Object,
      // chartType
      type: {
        type: String,
        default: 'map3D'
      },
      columns: Array,
      rows: Array,
      loader: Function,
      // 构造序列数据项辅助函数
      dataHelper: [Object, Function],
      // 序列构造辅助函数
      typeHelper: [Object, Function],
      mapStyle: Object
    },
    data() {
      return {}
    },
    computed: {
      mapGeoName() {
        return this.name || `map${this._uid}`
      },
      options() {
        const extend = typeof this.extend === 'function' ? this.extend() : this.extend
        return Object.freeze(merge({
          visualMap: this.visual
            ? {
              ...visualMap,
              ...this.visual
            }
            : null
        }, extend))
      },
      mapSettings() {
        return {
          mapStyle: merge({},
            mapStyle,
            this.mapStyle,
            {
              viewControl: {
                ...viewControl,
                ...this.control
              }
            }),
          typeHelper: this.typeHelper,
          dataHelper: this.dataHelper
        }
      }
    }
  }
&lt;/script>

&lt;style lang="scss" scoped>

&lt;/style>
</code></pre>
        </article>
    </section>





    
</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Sun May 30 2021 01:03:30 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>




<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?c4e5f73318b5cb0c389e3d9a05f831cc";
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(hm, s);
})();
</script>

</body>
</html>
